import type { IUserInfoResp } from '@/layouts/user-layout/type'
import type { ICaseProcessItem, ICaseTableItem, IcaseResult } from '@/views/cases/type'

export interface AppState {
  socketData: any
  socketStatus: any
  socketConnectEnd: boolean
  tableSearchFormInfo: Record<string, any> | null
}

export interface CaseState {
  caseInfo: ICaseTableItem | null
  caseProcess: ICaseProcessItem[]
  formInfo: Record<string, any> | null
  caseResult: IcaseResult | null
  caseRunLoading: boolean
  processUpdate: {
    'Caculation Result': boolean
    'SOM': boolean
    'Sensitivity analysis': boolean
    'Optimization': boolean
    'Contribution': boolean
  }
  currentStepNumber: number
  wsNotifyEndStatus: boolean
  clusterMax: number
}

export interface UserState {
  token: string
  refreshToken: string
  userInfo: IUserInfoResp | null
}

export enum UserTokenEnum {
  ACCESS_TOKEN = 'dynimic_access_token',
  REFRESH_TOKEN = 'dynimic_refresh_token',
  LSU_UID = 'dynimic_uid',
}
